﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Mvc;
using GAE_PI.Models;
using GAE_PI.Exceptions;

namespace GAE_PI.Controllers
{
    public class SupprimerActiviteController : Controller
    {

        //
        // GET: /SupprimerActivite/
        public ActionResult SupprimerActivite()
        {
            return RedirectToAction("ConsulterActivites", "ConsulterActivites");
        }

        [HttpPost]
        public ActionResult SupprimerActivite(string nomA)
        {
            if (DBModel.getDBM().isAdmin())
                DBModel.getDBM().supprimerActivite(nomA);
            return RedirectToAction("ConsulterActivites", "ConsulterActivites");
        }

    }
}
